home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
LANG
/
C
/
LIB
/
PARI
/
PARI2
/
pari
/
other
/
pari_elc
< prev
next >
Wrap
Text File
|
1991-11-13
|
13KB
|
256 lines
(provide (quote gp))
(defconst gp-chap3 "~pari/PARISOURCES/tex/usersch3.tex" "\
The TeX source for chapter 3 of the PARI-GP manual")
(defconst gp-file-name "/usr/local/bin/gp" "\
The file name of the gp executable file")
(defconst gp-man-dvi "~pari/SPARC/tex/users.dvi" "\
dvi version of the manual")
(defconst gp-menu "~pari/PARISOURCES/pari.menu" "\
menu file")
(defconst gp-dvi-preview "xdvi -s 3" "\
dvi previewer (and options)")
(defvar gp-stack-size "4000000" "\
Default stack size: passed to the progam gp.")
(defvar gp-buffer-size "30000" "\
Default buffer size: passed to the progam gp.")
(defvar gp-prime-limit "500000" "\
Default prime limit: passed to the progam gp.")
(defvar gp-prompt-for-args nil "\
A non-nil value makes M-x gp act like C-u M-x gp,
ie prompt for the command line arguments.")
(defvar gp-prompt-pattern "---- (type return to continue) ----\\|\\?[
]*" "Regexp used to match gp prompts.
can be set with gp-set-prompt (bound to M-\\ p)")
(defvar gp-map (make-sparse-keymap) "\
Local keymap used in buffer *PARI*.")
(define-key gp-map "" (quote gp-send-input))
(define-key gp-map "™" (quote gp-copy-input))
(define-key gp-map "Üp" (quote gp-set-prompt))
(define-key gp-map "Üt" (quote gp-meta-t))
(define-key gp-map "Üd" (quote gp-meta-d))
(define-key gp-map "Ür" (quote gp-meta-r))
(define-key gp-map "Üw" (quote gp-meta-w))
(define-key gp-map "Üv" (quote gp-meta-v))
(define-key gp-map "Üx" (quote gp-meta-x))
(define-key gp-map "Üs" (quote gp-meta-s))
(define-key gp-map "Üb" (quote gp-meta-b))
(define-key gp-map "Ük" (quote gp-meta-k))
(define-key gp-map "Üq" (quote gp-meta-q))
(define-key gp-map "¿" (quote gp-get-man-entry))
(define-key gp-map "Üc" (quote gp-menu))
(define-key gp-map "Ü\\" (quote gp-break-long-line))
(define-key gp-map "" (quote gp-interrupt))
(defvar gp-process nil "\
")
(defvar gp-man-process nil "\
")
(defun gp (flag) "\
Open a buffer and a window for the execution of gp.
The following bindings are available:
\\{gp-map}
The variables
gp-file-name gp-stack-size gp-buffer-size gp-prime-limit
determine the command line that starts gp.
To override the default settings, give gp a prefix argument.
C-u M-x gp ." (interactive "P") (byte-code "Á⇦ÎÏ!⇦db⇦◰ Áŵn Ð ⇦Ñ⇨⇦Ò⇨⇦ÓÔ!⇦Õ!⇦Ö⇨⇦ŷ/ ×Ø Ù$×Ú
Û$×ÜÝ$×Þß$RààQc⇦áâÏãäP%⇨*⇦åæ\"" [gp-process nil major-mode mode-name gp-map mode-line-process flag gp-prompt-for-args gp-command gp-file-name gp-stack-size gp-buffer-size gp-prime-limit shell-file-name switch-to-buffer "*PARI*" kill-all-local-variables gp "GP" run-hooks gp-mode-hook use-local-map (": %s") gp-read-input "Gp executable ?" "" "Stack size ?" " -s " "Buffer size ?" " -b " "Prime limit ?" " -p " "
" start-process "pari" "-c" "stty nl; exec " set-process-sentinel gp-sentinel] 15))
(defun gp-read-input (prompt default sep flag) "\
If flag is non-nil, reads string then if string is \"\" uses default.
If flag is nil then string is the default.
If resulting string is not \"\" prepends sep.
As a special case, if string is a space, return \"\"." (byte-code " ◰ Å
ÆÇR!ŵ ÈÉ\"◰( ÈÉ\"◰\" Éŵ% Pŵ6 ÈÊ\"◰3 Éŵ6 P)" [string flag prompt default sep read-input " (Default " ") " equal "" " "] 6))
(defun gp-sentinel (proc msg) "\
Sentinel for the gp-process in buffer *PARI*." (byte-code "ÇÈ!Ŷ Èq⇦db⇦c⇦ÉÈ!⇦ÇÊ!Ŷ ËÊ!⇦Ì
! Ŷ( Ë !)⇦Ì! Ŷ5 Ë !)⇦Í!ŶG ÎÏP!⇦ÐÑ\"⇦Æ⇨" [msg b gp-chap3 gp-menu gp-temp-file gp-process nil get-buffer "*PARI*" delete-windows-on "*gp-help*" kill-buffer get-file-buffer file-exists-p shell-command "rm " message "Removing %s"] 13))
(defun gpman nil "\
Start up xdvi with the gp manual." (interactive) (byte-code "Á⇦ÅÆ!⇦ÇÈ!q⇦◰ Áŵ- ÉÊ
ËR!⇦ÌÍÈÎÏ
ËR%⇨⇦ÐÑ\"" [gp-man-process nil gp-dvi-preview gp-man-dvi shell-file-name run-hooks gp-mode-hook get-buffer-create "*GP-MAN*" message "Starting " " " start-process "gp-man" "-c" "exec " set-process-sentinel gp-man-sentinel] 12))
(defun gp-man-sentinel (proc msg) "\
Sentinel for the gp-man-process in buffer *GP-MAN*." (byte-code "Å !Ŷ Æ!)⇦ÇÈ
P!⇦Ä⇨" [buf proc msg gp-man-process nil process-buffer kill-buffer message "gpman: "] 5))
(defun gp-copy-input nil "\
Copy expression around point to the end of the buffer.
(Unless this is already the last expression.)" (interactive) (byte-code "É⇦Ê!⇦ËÌ!Í ⇦Î!⇦`⇨⇦ b)⇦ÎÏÐQdÄ#◰, ÑÌ!ŵ- d
b⇦ÒÓ!◰; Ôŵ<